import {Routes} from 'Shared/utils/routeManager';
import {formatMessage} from './intl';

const routes = new Routes({
    query: {
        url: '/',
        title: formatMessage({
            id: 'routes.query',
            defaultMessage: '查询'
        })
    },
    detail: {
        url: '/:id/detail',
        title: formatMessage({
            id: 'routes.detail',
            defaultMessage: '详情'
        }),
        format: '/{0}/detail'
    },
    update: {
        url: '/:id/update',
        title: formatMessage({
            id: 'routes.update',
            defaultMessage: '编辑'
        }),
        format: '/{0}/update'
    },
    importCheckAttributes: {
        url: '/importCheckAttributes',
        title: formatMessage({
            id: 'routes.importCheckAttributes',
            defaultMessage: '检查属性导入'
        }),
    },
    importSalesAttributes: {
        url: '/importSalesAttributes',
        title: formatMessage({
            id: 'routes.importSalesAttributes',
            defaultMessage: '销售属性导入'
        }),
    },
    importProduceAttributes: {
        url: '/importProduceAttributes',
        title: formatMessage({
            id: 'routes.importProduceAttributes',
            defaultMessage: '生产信息导入'
        }),
    }
});

export default routes;
